//引入mockjs
import Mock from 'mockjs'

//使用mockjs模拟数据
Mock.mock('/mock/test', {
    "code":0,
    "data":
      {
        "mtime": "@datetime",//随机生成日期时间
        "score|1-800": 800,//随机生成1-800的数字
        "rank|1-100":  100,//随机生成1-100的数字
        "stars|1-5": 5,//随机生成1-5的数字
        "nickname": "@cname",//随机生成中文名字
      },
      "msg":"请求成功"
    });

    //用户列表
    Mock.mock('/api/user/index.html',{
      "code":200,
      "msg":"请求成功",
      "data|1-4":[
        {
        "id|1000-10000":1000,
        "age|0-200":30,
        "name":"@cname",
        "type|1":["学生","老师","工人"],
      }
    ]
    });